package com.itheima.reggie.common;

import org.springframework.context.annotation.Configuration;

/**
 * @author tongchen
 * @create 2023-01-25 14:47
 */

public class BaseContext {
    //创建线程变量
    private static ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    //创建线程的get和set方法
    public static void setThreadLocalId(Long threadId){
        threadLocal.set(threadId);
    }
    public static Long getThreadLocalId(){
        return threadLocal.get();
    }
}
